from flask import Flask, render_template, jsonify
import utils
import json

app = Flask(__name__)

@app.route('/')
def main():
    return render_template('main.html')

@app.route('/time')
def time():
    return utils.get_time()

@app.route('/data')
def data():
    return json.loads(utils.get_data())

@app.route('/mapData')
def mapData():
    res = utils.get_map_data()
    return jsonify({"data":res})

@app.route('/vaccineData')
def vaccineData():
    return utils.spider_vaccine_data()



if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)
